1. Field of the Invention
The present invention relates to a magnetic sensor that detects the intensity of magnetic field and to an electronic device provided with the magnetic sensor.
2. Description of Related Art
Conventionally, among electronic devices that can be deformed owing to a folding mechanism, sliding mechanism, or the like, those using a magnetic sensor so that the deformed state can be detected are disclosed in, for example, JP-A-2008-32424 and JP-A-2005-214900. Hereinafter, with reference to FIGS. 12 to 15, a description will be given of how the magnetic sensor is used.
As shown in FIG. 12, an electronic device (e.g., a cellular telephone) 150 includes a first casing 151 and a second casing 152 that are connected via a sliding mechanism. First, a description will be given of an electronic device (a sliding-type device) in which the second casing 152 is slidable with respect to the first casing 151. In the sliding-type device, a magnetic sensor 153 is arranged in the first casing 151, and a magnet 154 is arranged in the second casing 152. With respect to the distance from the magnetic sensor 153 to the magnet 154, let the distance in the sliding direction be L, and the distance in a direction perpendicular to the sliding direction be d.
In this case, if a sufficient distance d is secured, the relationship between magnetic flux density B detected by the magnetic sensor 153 and distance L is roughly as shown in an upper part of FIG. 13. That is, the greater the distance L (the greater the sliding amount), the greater the distance from the magnetic sensor 153 to the magnet 154, and thus the detected magnetic flux density B tends to be low.
Thus, as the magnetic sensor 153, one is used that switches an output signal, as shown in a lower part of FIG. 13, from H level to L level when the magnetic flux density B becomes larger than a predetermined threshold value Bops and from the L level to the H level when the magnetic flux density B becomes smaller than a predetermined threshold value Brps. This makes it possible for the electronic device 150 to detect the state of the output signal of the magnetic sensor 153 and thus to detect the deformed state of the electronic device 150.
Next, a description will be given of an electronic device (a folding-type device) comprising, as shown in FIG. 14, an electronic device 150 including a first casing 151 and a second casing 152 that are connected via a hinge mechanism 155, the second casing 152 being able to be opened/closed with respect to the first casing 151. In the folding-type device, a magnetic sensor 153 is arranged in the first casing 151, and a magnet 154 is arranged in the second casing 152. Let the angle formed by the first casing 151 and the second casing 152 be θ.
In this case, if the influence of another magnetic body (other than the magnet 154) is sufficiently small, the relationship between the magnetic flux density B detected by the magnetic sensor 153 and the angle θ is roughly as shown in an upper part of FIG. 15. That is, the greater the angle θ (the more it is close to the fully open state with respect to the closed state), the greater the distance from the magnetic sensor 153 to the magnet 154, and thus, the detected magnetic flux density B tends to be low.
Thus, as the magnetic sensor 153, one is used that switches an output signal, as shown in a lower part of FIG. 15, from the H level to the L level when the magnetic flux density B becomes larger than a predetermined threshold value Bops and from the L level to the H level when the magnetic flux density B becomes smaller than a predetermined threshold value Brps. This makes it possible for the electronic device 150 to detect the state of the output signal of the magnetic sensor 153 so as to detect the deformed state of the electronic device 150.
The magnetic sensor 153 described above can detect the intensity of magnetic field at both poles. Specifically, the magnetic sensor 153 switches the output signal from the H level to the L level when the magnetic flux density B is, in the N-pole direction, over a predetermined threshold value Bopn (of opposite polarity from but equal magnitude to Bops). In addition, the magnetic sensor 153 switches the output signal from the L level to the H level when the magnetic flux density B is, in the N-pole direction, below a predetermined threshold value Brpn (of opposite polarity from but equal magnitude to Brps). This makes it possible for the electronic device 150 to properly detect its deformed state irrespective of the fitting direction of the magnet 154.
In the sliding-type device mentioned above, if the distance d is set relatively small, the relationship between the magnetic flux density B detected by the magnetic sensor 153 and the distance L may be, for example, as shown in an upper part of FIG. 16. Specifically, the magnetic sensor 153 may be strongly influenced by the reverse magnetic field caused by the magnet 154, and thus a phenomenon may occur in which the magnetic flux density B exceeds Bopn in the N-pole direction (hereinafter, such a phenomenon is referred to as the “reverse magnetic field phenomenon” for the sake of convenience).
When the reverse magnetic field phenomenon occurs, the state transition of the output signal occurs with unintended timing as shown in a lower part of FIG. 16. Thus, in the electronic device 150, there arise inconveniences such as erroneous detection of the deformed state.
If, in the folding-type device mentioned above, another magnetic body (e.g., a speaker) is arranged near the magnetic sensor (for example, at position 156 shown in FIG. 14), the relationship between the magnetic flux density B detected by the magnetic sensor 153 and the angle θ may be, for example, as shown in FIG. 17. Specifically, due to the influence of another magnetic body, an offset occurs in the magnetic flux density B, and thus, even when the angle θ is sufficiently great, a phenomenon may occur in which the magnetic flux density B does not fall below Brps (hereinafter, such a phenomenon will be referred to as the “magnetic-field offset phenomenon” for the sake of convenience).
When the magnetic-field offset phenomenon occurs, the output signal may not transit to the H level although the angle θ is sufficiently great. As a result, in the electronic device 150, there arises an inconvenience that the deformed state (in particular, a change from the closed state to the open state) cannot be detected correctly.
In the sliding-type device, it seems that if the distance d is properly set, the reverse magnetic field phenomenon could be avoided. In the folding-type device, it seems that if the influence of another magnetic body does not act on the magnetic sensor, the magnetic-field offset phenomenon could be avoided.
However, when such phenomena are found at a stage where specifications of the electronic device body have been determined to a certain extent, in order to eliminate the phenomena, a correction etc. of the distance d or the speaker position is generally required. Such a correction often involves a major revision etc. of specifications of the electronic device body, and thus is preferably avoided as much as possible. Moreover, due to design limitations of the electronic device body, a situation may occur in which the distance d must be reduced or another magnetic body must be arranged near the magnetic sensor.